package com.wn.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "景点")
public class ScenicSpots {
    private Integer id;

    @NotBlank(message = "景点名称不能为空！")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,8}$",message = "景点名称为汉字")
    private String scenicSpotsName;

    private String scenicSpotsImg;

    @NotBlank(message = "景点地址不能为空！")
    private String scenicSpotsAddress;

    @ApiModelProperty(hidden = true,value = "城市区号")
    private Integer travelAreaRegioncode;

    private String scenicSpotsAnnouncement;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private String scenicSpotsOpentime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private String scenicSpotsClosetime;

//    @Pattern(regexp = "^1[345678][0-9]{9}$",message = "客服电话格式错误！")
    @Pattern(regexp = "^0\\d{2,3}-\\d{7,8}$",message = "景点电话号码格式错误！")
    private String scenicSpotsServicePhone;

    @ApiModelProperty(hidden = true)
    private String scenicSpotsStatus;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private String createTime;

    @ApiModelProperty(hidden = true)
    private Integer createUserId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(hidden = true)
    private String updateTime;

    @ApiModelProperty(hidden = true)
    private Integer updateUserId;

    @ApiModelProperty(hidden = true)
    private String isDeleted;

    @ApiModelProperty(hidden = true, value = "景点状态 0--正常，1--锁定")
    private Integer status;

    private Float lng; //经度

    private Float lat;//维度

    @Pattern(regexp = "(^[1-9]\\d*(\\.\\d{1,2})?$)|(^0(\\.\\d{1,2})?$)")
    private String scenicSpotsPrice;


    @Override
    public String toString() {
        return "ScenicSpots{" +
                "id=" + id +
                ", scenicSpotsName='" + scenicSpotsName + '\'' +
                ", scenicSpotsImg='" + scenicSpotsImg + '\'' +
                ", scenicSpotsAddress='" + scenicSpotsAddress + '\'' +
                ", travelAreaRegioncode=" + travelAreaRegioncode +
                ", scenicSpotsAnnouncement='" + scenicSpotsAnnouncement + '\'' +
                ", scenicSpotsOpentime=" + scenicSpotsOpentime +
                ", scenicSpotsClosetime=" + scenicSpotsClosetime +
                ", scenicSpotsServicePhone=" + scenicSpotsServicePhone +
                ", scenicSpotsStatus='" + scenicSpotsStatus + '\'' +
                ", createTime=" + createTime +
                ", createUserId=" + createUserId +
                ", updateTime=" + updateTime +
                ", updateUserId=" + updateUserId +
                ", isDeleted='" + isDeleted + '\'' +
                ", status=" + status +
                '}';
    }
}
